# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=allegro
pkgver=5.2.6.0
pkgrel=0
arch="all"
url="https://liballeg.org"
pkgdesc="Portable library mainly aimed at video game and multimedia programming"
license="BSD-3-Clause"
makedepends="cmake xorg-server-dev mesa-dev glu-dev libxcursor-dev libjpeg-turbo-dev
	libwebp-dev flac-dev libvorbis-dev libxi-dev libtheora-dev alsa-lib-dev
	pulseaudio-dev sdl2-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/liballeg/allegro5/archive/$pkgver/allegro5-$pkgver.tar.gz"
subpackages="$pkgname-dev"
options="!check" # No tests
builddir="$srcdir/allegro5-$pkgver"

build() {
	cmake \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DALLEGRO_SDL=ON
	make
}

package() {
	DESTDIR="$pkgdir" make install
}

sha512sums="d590c1a00d1b314c6946e0f6ad3e3a8b6e6309bada2ec38857186f817147ac99dae8a1c4412abe701af88da5dca3dd8f989a1da66630192643d3c08c0146b603  allegro-5.2.6.0.tar.gz"
